import { KVAny } from "./kv";

export interface ResponseData extends KVAny {
  code: number;
  msg?: string;

  data: any;
}

export interface ResponseTypedData<T> extends ResponseData {
  code: number;
  msg?: string;

  data: T;
}

export interface ResponseKVData<T extends KVAny> extends ResponseData {
  data: T;
}

export interface ResponseListData<T> extends ResponseData {
  data: {
    list: T[];
    rows?: T[];
    count?: number;
    total?: number;
  };
}
